package com.ifonly.activerecord.sql.handlers;

import com.ifonly.activerecord.Record;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

/**
 * @author <a href="mailto:ifonlymaster@163.com">ifonly</a>
 * @version 1.0 2015-12-28 13:11
 * @since JDK 1.6
 */
public class ListRecordResultSetHandler extends AbstractListHandler<Record> {

    @Override
    public Record handleResultSet(ResultSet rs) throws SQLException {
        Map<String, Object> map = rowResultSetToMap(rs);

        Record record = new Record();
        record.setColumnAndValues(map);
        return record;
    }

}
